<!--模板：html-->
<template>
  <div id="app">
    <!--<users v-bind:users="users"></users>-->
    <!--<users v-bind:users="users"></users>-->
    <!--<app-footer v-bind:title="title"></app-footer>-->

    <router-view v-bind:ment="ment"/>
  </div>
</template>
<!--2行为：处理逻辑-->
<script>
  //局部注册组件
  // import Users from './components/Users'
  // import header from './components/header'
  // import footer from './components/footer'
  // import index from './components/index'
  // import Users from './components/Users'
  // import Withdraw from './components/Withdraw'


  // import Users from "../../小猪理财/src/components/Users";
export default {
  name: 'App',
    // props:["users"],

  data(){
    return {

      "ment":[
        {
          "ent":"/RichScan",
          "url":"../../static/img/扫一扫.jpg",
          "text":"扫一扫"
        },
        {
          "ent":"/Withdraw",
          "url":"../../static/img/主页付钱.jpg",
          "text":"付钱"
        },
        {
          "ent":"/Pay",
          "url":"../../static/img/主页收钱.jpg",
          "text":"收钱"
        },
        {
          "ent":"/Service",
          "url":"../../static/img/主页卡包.jpg",
          "text":"卡包"
        }
      ]
    }

  },
  components:{
    // "index":index,
    // "users":Users

    // "app-footer":footer

  },
  //跨域接口地址：http://www.thenewstep.cn/test/testToken.php
//token:f4c902c9ae5a2a9d8f84868ad064e706
//请求头：Content-type:application/json
  created (){
    //fetch
    fetch("/apis/test/testToken.php",{
      method:"post",
      headers:{
        token:"f4c902c9ae5a2a9d8f84868ad064e706"
      },
      body:JSON.stringify({username:"luohan",password:"123456"})
    })
    .then(result => {
      // console.log(result)
        return result.json()
    })
    .then(data => {
      console.log(data)
    })


    //axios
    
  }
}
</script>
<!--2样式：解决样式-->
<style>

</style>
